Skip to content

Add Qdrant MCP server configuration. #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

MH0386
Copy link

@MH0386 MH0386 commented Jul 15, 2025

This pull request introduces a new server configuration for Qdrant, a high-performance vector database and search engine, by adding a server.yaml file. The file defines metadata, runtime settings, environment variables, and configuration parameters required to integrate Qdrant into the system.

New Qdrant Server Configuration:

  • Metadata and About Section: Added metadata for the Qdrant server, including its name, category (database), tags, and a description highlighting its capabilities as a vector database and search engine.

  • Runtime Configuration: Defined the runtime command (uvx mcp-server-qdrant) and a volume mapping for the embedding model cache (fastembed_model:/hf).

  • Environment Variables: Introduced environment variables for configuring Qdrant, such as QDRANT_URL, COLLECTION_NAME, EMBEDDING_PROVIDER, and logging/debug settings (FASTMCP_LOG_LEVEL, FASTMCP_DEBUG, etc.).

  • Configurable Parameters: Added parameters for Qdrant connection settings (e.g., qdrant_url, collection_name, embedding_model) and server behavior (e.g., logging level, debug mode, warnings for duplicates). Some parameters include default values, and collection_name is required.

…emove unused fastmcp_host/port settings, and include FASTEMBED_CACHE_PATH.
@ipedrazas
Copy link
Contributor

Thank you for your contirbution!

This is the result of running task build -- --tools qdrant

task build -- --tools qdrant
task: [build] go run ./cmd/build --tools qdrant
[+] Building 16.9s (7/7) FINISHED                                                                                                                                                                                                          docker:desktop-linux
 => [internal] load git source https://github.com/qdrant/mcp-server-qdrant.git#v0.8.0                                                                                                                                                                      1.1s
 => [internal] load metadata for docker.io/library/python:3.11-slim                                                                                                                                                                                        1.1s
 => [1/4] FROM docker.io/library/python:3.11-slim@sha256:139020233cc412efe4c8135b0efe1c7569dc8b28ddd88bddb109b764f8977e30                                                                                                                                  0.1s
 => => resolve docker.io/library/python:3.11-slim@sha256:139020233cc412efe4c8135b0efe1c7569dc8b28ddd88bddb109b764f8977e30                                                                                                                                  0.1s
 => CACHED [2/4] WORKDIR /app                                                                                                                                                                                                                              0.0s
 => [3/4] RUN pip install --no-cache-dir uv                                                                                                                                                                                                                3.6s
 => [4/4] RUN uv pip install --system --no-cache-dir mcp-server-qdrant                                                                                                                                                                                     3.6s
 => exporting to image                                                                                                                                                                                                                                     7.1s
 => => exporting layers                                                                                                                                                                                                                                    5.4s
 => => exporting manifest sha256:6c969f1f66d4ed6589560b6b527612253fb8cc0210ac77375d8a63738db2bd74                                                                                                                                                          0.0s
 => => exporting config sha256:fb30a41c1ae28048d37f485298d9a5f993a93fd4bb52917144b995524d377f53                                                                                                                                                            0.1s
 => => exporting attestation manifest sha256:b1ac1a515986fe464d53c1eab32c0f8351605b8a670e7163d0e7d92873538d34                                                                                                                                              0.1s
 => => exporting manifest list sha256:fad6c1a52d0f4b3c12c8c762cc6ab83bf139b0f4cd528b00dc0a1b37b8308eb7                                                                                                                                                     0.1s
 => => naming to docker.io/library/check:latest                                                                                                                                                                                                            0.0s
 => => unpacking to docker.io/library/check:latest                                                                                                                                                                                                         1.3s
 => => naming to docker.io/mcp/qdrant:latest                                                                                                                                                                                                               0.0s
 => => unpacking to docker.io/mcp/qdrant:latest                                                                                                                                                                                                            0.0s

 2 warnings found (use docker --debug to expand):
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "QDRANT_API_KEY") (line 16)
 - JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 21)

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview
2025/07/21 11:29:24 initializing mcp/qdrant: Downloading hf-xet (2.9MiB)
Downloading cryptography (4.0MiB)
Downloading grpcio (5.5MiB)
Downloading pillow (5.7MiB)
Downloading sympy (6.0MiB)
Downloading pydantic-core (1.8MiB)
Downloading numpy (13.9MiB)
Downloading onnxruntime (13.8MiB)
Downloading pygments (1.2MiB)
Downloading tokenizers (2.9MiB)
   Building pyperclip==1.9.0
      Built pyperclip==1.9.0
 Downloading pygments
 Downloading pydantic-core
 Downloading hf-xet
 Downloading tokenizers
 Downloading cryptography
 Downloading grpcio
 Downloading pillow
 Downloading sympy
 Downloading onnxruntime
 Downloading numpy
Installed 75 packages in 57ms
Traceback (most recent call last):
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/bin/mcp-server-qdrant", line 12, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/lib/python3.11/site-packages/mcp_server_qdrant/main.py", line 22, in main
    from mcp_server_qdrant.server import mcp
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/lib/python3.11/site-packages/mcp_server_qdrant/server.py", line 10, in <module>
    qdrant_settings=QdrantSettings(),
                    ^^^^^^^^^^^^^^^^
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/lib/python3.11/site-packages/pydantic_settings/main.py", line 188, in __init__
    super().__init__(
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/lib/python3.11/site-packages/pydantic/main.py", line 253, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for QdrantSettings
  Value error, If 'local_path' is set, 'location' and 'api_key' must be None. [type=value_error, input_value={'QDRANT_URL': 'http://lo...ath/to/qdrant/database'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.11/v/value_error
exit status 1

Could you make that listing tools does not need any configuration, please? we only push to hub docker images that succesfully list tools.

@MH0386
Copy link
Author

MH0386 commented Jul 23, 2025

The issue at hand is that the Qdrant MCP requires either the QDRANT_LOCAL_PATH or the QDRANT_URL environment variable to be specified during the initialization process. I am currently working to get this resolved. Environment Variables for Qdrant MCP

@MH0386 MH0386 marked this pull request as ready for review July 24, 2025 21:36
@MH0386 MH0386 requested a review from a team as a code owner July 24, 2025 21:36
@MH0386 MH0386 marked this pull request as draft July 25, 2025 14:33
Comment on lines +33 to +41
- name: QDRANT_URL
example: 'http://localhost:6333'
value: '{{qdrant.qdrant_url}}'
- name: COLLECTION_NAME
example: 'my-collection'
value: '{{qdrant.collection_name}}'
- name: QDRANT_LOCAL_PATH
example: 'None'
value: '{{qdrant.qdrant_local_path}}'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to address an issue I encountered regarding the configuration file server.yaml for the Docker MCP Registry. This file is required to specify all environment variables (options) for the Qdrant MCP.

The first concern is that both QDRANT_URL (referred to as location) and QDRANT_LOCAL_PATH (referred to as local_path) are set simultaneously. This configuration has led to a validation error, as it is not permissible to provide both options at the same time.

The validation error is as follows:

Traceback (most recent call last):
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/bin/mcp-server-qdrant", line 12, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/lib/python3.11/site-packages/mcp_server_qdrant/main.py", line 22, in main
    from mcp_server_qdrant.server import mcp
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/lib/python3.11/site-packages/mcp_server_qdrant/server.py", line 10, in <module>
    qdrant_settings=QdrantSettings(),
                    ^^^^^^^^^^^^^^^^
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/lib/python3.11/site-packages/pydantic_settings/main.py", line 188, in __init__
    super().__init__(
  File "/root/.cache/uv/archive-v0/SZ7ANpRs8hfrR56uyvt3d/lib/python3.11/site-packages/pydantic/main.py", line 253, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for QdrantSettings
  Value error, if 'local_path' is set, 'location' and 'api_key' must be None. [type=value_error, input_value={'QDRANT_URL': 'http://lo...ath/to/qdrant/database'}, input_type=dict]
    For further information, visit https://errors.pydantic.dev/2.11/v/value_error
exit status 1

Additionally, the QDRANT_LOCAL_PATH variable is mistakenly set to the string 'None', which is not equivalent to the actual None value in Python. This can further contribute to validation issues.

To resolve this matter, I have submitted a pull request to the Qdrant MCP repository.

I will provide updates as soon as the issue has been addressed. Thank you for your attention to this matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants